import java.util.PriorityQueue;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 123
 * Date: 2023-07-13
 * Time: 9:24
 */
public class test {
    public static void main(String[] args) {
     int[] arr = new int[]{23,11,24 , 45 , 9 , 64} ;

      int a = 10 ;
      int b = 20 ;
      swap(a , b);
        System.out.println(a + "  " + b);
    }
    public  static  void swap(int a , int b ){
    int tmp  = b ;
    b = a ;
    a = tmp ;

    }


}

class Solution {
    public int[] smallestK(int[] arr, int k) {
        PriorityQueue<Integer> priorityQueue =
                new PriorityQueue<>(k) ;
        for (int i = 0; i < k; i++) {
            priorityQueue.offer(arr[i]) ;
        }
        for (int i = k; i < arr.length; i++) {
            int top = priorityQueue.peek() ;
            if(top < arr[i]){
                priorityQueue.poll() ;
                priorityQueue.offer(arr[i]) ;
            }

        }
        


    }
}